/**
 * 
 */
package com.davetrudes.jung.client.visualization.event;

/**
 * @author dave.trudes
 *
 * @see java.awt.ItemSelectable
 */
public interface ItemSelectable {

	/**
	 * Returns the selected items or <code>null</code> if no
	 * items are selected
	 * 
	 * @return
	 */
	public Object[] getSelectedObjects();
	
	/**
	 * Adds a listener to receive item events when the state of an item is
	 * changed by the user. Item events are not sent when an item's
	 * state is set programmatically. If <code>l</code> is
	 * <code>null</code>, no exception is thrown and no action is performed.
	 * 
	 * @param l	the listener to recieve events
	 */
	public void addItemListener(ItemListener l);
	
	/**
	 * Removes an item listener.
 	 * If <code>l</code> is <code>null</code>,
 	 * no exception is thrown and no action is performed.
 	 *
 	 * @param l the listener being removed
 	 * @see ItemEvent
 	 */
	public void removeItemListener(ItemListener l);
	
}
